package ch5;

public class SNum {

	public static void main(String[] args) {
		// 9000-1000之间能被3,7,11整除，而且百位不是2的数
		int start = 9000;
		// 有错误
		while (start <= 10000) {
//			if (start % 3 == 0 && start % 7 == 0 && start % 11 == 0 && start / 100 % 10 != 2) {
//				System.out.println(start);
//			}
			// System.out.println(start);
			if (start % 3 != 0)
				continue;
			if (start % 7 != 0)
				continue;
			if (start % 11 != 0)
				continue;
			if (start / 100 % 10 == 2)
				continue;

			System.out.println(start);
			start++;
		}
	}

}
